Open
Conversation
| { | ||
| // TODO: 프로그램 구현 | ||
|
|
||
| Scanner sc = new Scanner(System.in); |
There was a problem hiding this comment.
미션 요구사항에 나와있는 Console.readLine() 을 사용해주세요!
|
|
||
| public class Application | ||
| { | ||
| public static void main(String[] args) |
There was a problem hiding this comment.
main 메서드 내에서 너무 많은 역할을 가지고 있는 것 같아요!
각 코드의 역할을 좀 더 알아보기 쉽게 메서드를 분리해보는게 어떨까요?
| cars.add(new Car(name)); | ||
| } | ||
|
|
||
| int count=sc.nextInt(); |
Comment on lines
+36
to
+38
| if(car.getPosition()>win) { | ||
| win = car.getPosition(); | ||
| } |
There was a problem hiding this comment.
depth가 깊어지는것 같은데 메서드로 뺄 수 있을 것 같아요~!
| winCars.add(car.getName()); | ||
| } | ||
| } | ||
| System.out.print("winner"+String.join(", ",winCars)); |
There was a problem hiding this comment.
ctrl + alt + L 을 통해서 라인정렬을 해 줄 수 있습니다 !
Comment on lines
+12
to
+16
| if (name.length() > 5) | ||
| { | ||
| throw new IllegalArgumentException("5자 이하만"); | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.